package com.yunc.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 部门表
 * @author congcong tao
 * @create 2018/11/20 下午9:49
 */
@TableName("sys_dept")
@Data
public class SysDept implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 任务ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    private Long parentId;

    private String code;

    /**
     * 部门名称
     */
    private String name;

    /**
     * 负责人
     */
    private String leader;

    /**
     * 手机号
     */
    private String phone;

    private String orderNum;

    /**
     * 状态（0正常 1暂停）
     */
    private String status;

    private Date createTime;

    @TableField(exist = false)
    private Boolean open;

    @TableField(exist = false)
    private Boolean isLast;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private List<?> children;
}
